package com.bwei.topnews.adapter;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.bwei.topnews.MainActivity;
import com.bwei.topnews.R;
import com.bwei.topnews.base.MyBaseAdapter;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by qwe on 2016/11/10.
 */
public class MoreChannelAdapter extends MyBaseAdapter<String> {


    public MoreChannelAdapter(MainActivity context, ArrayList<String> list) {
        super(list, context);
    }

    @Override
    protected View initGetView(int position, View convertView, ViewGroup parent) {
        convertView = View.inflate(context, R.layout.morechannel_text,null);
        TextView tv_title = (TextView) convertView.findViewById(R.id.tv_more_title);
        tv_title.setText(list.get(position).substring(0,list.get(position).indexOf(":")));
        return convertView;
    }
}
